import router from './router';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';

NProgress.configure({ showSpinner: false });


router.beforeEach((to, from, next) => {
    NProgress.start();
    if (to.path === '/') {
        next("/view");
        NProgress.done();
    }else{
        next();
        NProgress.done();
    }
});

router.afterEach(() => {
    NProgress.done();
});
